<?php
$hasErrors = false;
foreach($forms as $form) {
  if($form->hasErrors()) {
    $hasErrors = true;
    $global = $form->getGlobalErrors();
    break;
  }
}

if($hasErrors || (isset($global) && count($global))): ?>
<!--Error display box-->
<div class="clear error_box radius">
  <?php
  if (isset($global) && count($global)) {
    foreach($global as $e) {
      echo '<p>'.$e.'</p>';
    }
  }
  foreach($forms as $form) {
    foreach($form as $error) {
      if($error->getError()) {
        echo '<p>'.$error->getError().'</p>';
      }
    }
  }
  ?>
</div>
<?php endif; ?>